TO do: - mess around with parameters. - compare timbre and chroma example
TODO: Tekst readme plakken Computational musicology Corpus idea:
How did famous rapper Eminem’s style change through te years. From his firsts single "I just dont give a f*ck" in 1998 to one of hist latest songs “The adventures of moon man and slim shady” in 2020.
I chose this corpus, since Eminem is one of my favorite artists of all time. I find myself coming back to his songs on the regular and even went to his last tour in the Netherlands. Eminem has many singles and albums published through the years and all are surounded by some sort of controversion. Eminem even raps about the fact that some of his fans want the old slim shady back, but that he is not that person anymore. I want to check in what degree this statement holds when comparing his music through the years.
Eminem’s total of eleven studio albums make a great music library to compare on various aspects. In these albums Eminem changed up his rap game by collabing with artist and go for a more mainstream pop song. I want to see if this has happened more later on or if he did this before as well. Furthermore eminem is known for his many words per second in songs such as “rap god” or “Godzilla”
A possiblie weakness for the corpus might eb that some songs appear on multiple albums. On the one hand this shows that an artist is proud of a certain song and places it in more places. On the other hand i might have to look at the representations of these songs, to not get an unfair advantage or skew the data.
Main focus points
Least popular songs
Most popular songs
Interactive radarchart of spotify measurements on eminem
Chroma feature example of my favourtite eminem song.
Eminem
A thing to note already is that the paul skit appears on multiple albums and that his skits often aren’t very popular. A reason for this could be that these skits aren’t songs and are often a story within the album. An example is the paul skit or skits I should say. These skits, since there are multiple named Paul are a reference to his music manager Paul Rosenberg in which eminem often features a snippet of a phone conversation with some information about the album.
An interesting thing to see here is that all of his major albums have at least one song with a high popularity with personally one of his best albums “recovery” having two in it. I would like to delve into popularity per album and compare the populartiy with other things spotify measures later on.
It is interesting that instrumentalness is almost non-existent.
Energy and danceability are high.
Speechiness is low, this can be explained by eminemns gimmick. Namely rapping very fast, which is hard to replicate.
Most of his albums share the same charcteristics, mainly differing in energy.
Many skits are not popular, still eminem keeps them in his album. This might be since most albums have a story behind them and the skit shows some light on this backstory. An example is the skits with his manager Paul.
Most of his big albums have atleast one popular song. indicating that he is still performing well even after all those years.
WHat i still want to do is comapare different albums, especially one of his first vs one of his last and see if there are big differences between them. Sugestions on visualisation are welcome :)
---
title: " My portfolio"
author: "Jens Ruhof"
date: "2/20/2021"
output:
flexdashboard::flex_dashboard:
storyboard: true
social: menu
source: embed
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(spotifyr)
library(dplyr)
library(fmsb)
library(png)
library(plotly)
library(compmus)
```
``` {r get_playlist, include=FALSE}
# Eminem overall
Eminem <- get_playlist_audio_features("", "6E8sLG3bm1meTRj8n5l0ll")
mean_eminem <- Eminem %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
``` {r get_playlist_lp, include=FALSE}
# Shady lp
shady_lp <- get_playlist_audio_features("", "35sidb3NwfwV5QYnri3yLv")
mean_shadylp <- shady_lp %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
``` {r get_playlist_xv, include=FALSE}
shadyxv <- get_playlist_audio_features("", "3oJ5M47mmYILrqHyzuXctM")
mean_shadyxv <- shadyxv %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
``` {r get_playlist_rev, include=FALSE}
revival <- get_playlist_audio_features("", "7yqbChSYPODqONRuAw4noI")
mean_revival <- revival %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
``` {r get_playlist_ref, include=FALSE}
relapse_refill <- get_playlist_audio_features("", "1xyhz9gNz5jJIVTOA9v6Dh")
mean_relapse_refill <- relapse_refill %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
``` {r get_playlist_del, include=FALSE}
relapse_deluxe <- get_playlist_audio_features("", "1aQ1zZBcyBFDwsuOdm19cz")
mean_relapse_deluxe<- relapse_deluxe %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
``` {r get_playlist_rec, include=FALSE}
recovery <- get_playlist_audio_features("", "2FDhk6jh6iQUDCc7n73diZ")
mean_recovery<- recovery %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
``` {r get_playlist_ma, include=FALSE}
murdera <- get_playlist_audio_features("", "69NMqLx5Kszkwl0buUEoBA")
mean_murdera<- murdera %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
``` {r get_playlist_mb, include=FALSE}
murderb <- get_playlist_audio_features("", "5ZUIc7iAkEBBeEXzyj7eia")
mean_murderb<- murderb %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
``` {r get_playlist_show, include=FALSE}
eminemshow <- get_playlist_audio_features("", "5g2QlPXMIoH4j34xQiHE1J")
mean_eminemshow <- eminemshow %>%
summarise(
mean_danceability = mean(danceability),
mean_energy = mean(energy),
mean_speechiness = mean(speechiness),
mean_acousticness = mean(acousticness),
mean_instrumentalness = mean(instrumentalness),
mean_liveness = mean(liveness),
mean_valence = mean(valence)
)
```
### Week8 timbre and self similarity
``` {r}
mockingbird <-
get_tidy_audio_analysis("561jH07mF1jHuk7KlaeF0s") %>% # Change URI.
compmus_align(sections, segments) %>% # Change `bars`
select(sections) %>% # in all three
unnest(sections) %>% # of these lines.
mutate(
pitches =
map(segments,
compmus_summarise, pitches,
method = "rms", norm = "euclidean" # Change summary & norm.
)
) %>%
mutate(
timbre =
map(segments,
compmus_summarise, timbre,
method = "rms", norm = "euclidean" # Change summary & norm.
)
)
mockingbird %>%
compmus_gather_timbre() %>%
ggplot(
aes(
x = start + duration / 2,
width = duration,
y = basis,
fill = value
)
) +
geom_tile() +
labs(x = "Time (s)", y = NULL, fill = "Magnitude") +
scale_fill_viridis_c() +
theme_classic()
mockingbird %>%
compmus_self_similarity(timbre, "cosine") %>%
ggplot(
aes(
x = xstart + xduration / 2,
width = xduration,
y = ystart + yduration / 2,
height = yduration,
fill = d
)
) +
geom_tile() +
coord_fixed() +
scale_fill_viridis_c(guide = "none") +
theme_classic() +
labs(x = "", y = "")
```
***
#### week8 text
TO do:
- mess around with parameters.
- compare timbre and chroma example
### Introduction
TODO: Tekst readme plakken
Computational musicology Corpus idea:
How did famous rapper Eminem's style change through te years. From his firsts single "I just dont give a f*ck" in 1998 to one of hist latest songs "The adventures of moon man and slim shady" in 2020.
I chose this corpus, since Eminem is one of my favorite artists of all time. I find myself coming back to his songs on the regular and even went to his last tour in the Netherlands. Eminem has many singles and albums published through the years and all are surounded by some sort of controversion. Eminem even raps about the fact that some of his fans want the old slim shady back, but that he is not that person anymore. I want to check in what degree this statement holds when comparing his music through the years.
Eminem's total of eleven studio albums make a great music library to compare on various aspects. In these albums Eminem changed up his rap game by collabing with artist and go for a more mainstream pop song. I want to see if this has happened more later on or if he did this before as well. Furthermore eminem is known for his many words per second in songs such as "rap god" or "Godzilla"
A possiblie weakness for the corpus might eb that some songs appear on multiple albums. On the one hand this shows that an artist is proud of a certain song and places it in more places. On the other hand i might have to look at the representations of these songs, to not get an unfair advantage or skew the data.
***
Main focus points
- Least popular songs
- Most popular songs
- Interactive radarchart of spotify measurements on eminem
- Chroma feature example of my favourtite eminem song.
***
{width=100%}
### Least popular
``` {r}
LEAST <- Eminem %>%
group_by(track.popularity) %>%
filter(track.popularity <= 35) %>%
ggplot(aes(x =track.popularity , y = fct_reorder(track.name, track.popularity))) +
geom_col(aes(fill = track.album.name)) +
labs(x= "Popularity") +
ggtitle("What are the least popular Eminem songs?", "Popularity ranking < 35") +
theme(legend.position = "right",
legend.text = element_text( size = 10),
text = element_text(size = 10),
axis.title.y = element_blank())
ggplotly(LEAST)
```
***
#### Least popular songs
A thing to note already is that the paul skit appears on multiple albums and
that his skits often aren't very popular. A reason for this could be that these
skits aren't songs and are often a story within the album. An example is the
paul skit or skits I should say. These skits, since there are multiple named
Paul are a reference to his music manager Paul Rosenberg in which eminem often
features a snippet of a phone conversation with some information about the album.
### Most popular
``` {r}
most <- Eminem %>%
group_by(track.popularity) %>%
filter(track.popularity >= 75) %>%
ggplot(aes(x =track.popularity , y = fct_reorder(track.name, track.popularity))) +
geom_col(aes(fill = track.album.name)) +
labs(x= "Popularity") +
ggtitle("What are the most popular Eminem songs?", "Popularity ranking > 75") +
theme(legend.position = "right",
legend.text = element_text( size = 10),
text = element_text(size = 10),
axis.title.y = element_blank())
ggplotly(most)
```
***
#### Most popular songs of Eminem
An interesting thing to see here is that all of his major albums have at least one song with a high popularity with personally one of his best albums "recovery" having two in it. I would like to delve into popularity per album and compare the populartiy with other things spotify measures later on.
### Radarplot
``` {r}
# test <- plot_ly(
# type = "scatterpolar",
# r= c(0.7129386,0.7213708,0.2985401,0.1928719,0.01342138,0.2951325,0.5395462),
# theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
# fill = "toself"
# )
# test <- test %>%
# layout(
# polar = list(
# radialaxis = list(
# visible = T,
# range = c(0,1)
# )
# ),
# showlegend = F
# )
#
# test
fig <- plot_ly(
type = 'scatterpolar',
fill = 'toself'
)
fig <- fig %>%
add_trace(
r = c(0.7129386, 0.7213708, 0.2985401, 0.1928719, 0.01342138, 0.2951325, 0.5395462),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'Overall'
)
fig <- fig %>%
add_trace(
r = c(0.7283333, 0.6116333, 0.39715, 0.2735885, 0.05342238, 0.3095833, 0.6580333),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'Shady LP'
)
fig <- fig %>%
add_trace(
r = c(0.6994286, 0.7866071, 0.240125, 0.1382441, 0.0007273875, 0.2240429, 0.5306786),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'Shady XV'
)
fig <- fig %>%
add_trace(
r = c(0.68, 0.7187368, 0.2828474, 0.26261, 5.927158e-05, 0.3540158, 0.5248947),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'Revival'
)
fig <- fig %>%
add_trace(
r = c(0.6959655, 0.7850345, 0.3074414, 0.2102438, 3.313793e-07, 0.3116, 0.558),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'Relapse Refill'
)
fig <- fig %>%
add_trace(
r = c(0.7161364, 0.7728636, 0.3247182, 0.2411955, 4.368182e-07, 0.3461591, 0.551),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'Relapse Deluxe'
)
fig <- fig %>%
add_trace(
r = c(0.6685294, 0.9168824, 0.2466588, 0.1525941, 1.3e-07, 0.3044941, 0.5481765),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'Recovery'
)
fig <- fig %>%
add_trace(
r = c(0.714, 0.66645, 0.219065, 0.1089275, 0.0003467275, 0.31603, 0.431345),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'Music to be murdered by side A'
)
fig <- fig %>%
add_trace(
r = c(0.7418056, 0.6893056, 0.2627111, 0.1610169, 0.0004116275, 0.3235917, 0.5114167),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'Music to be murdered by side B'
)
fig <- fig %>%
add_trace(
r = c(0.72035, 0.604985, 0.28606, 0.1263365, 0.04794438, 0.17504, 0.504715),
theta = c("mean_danceability", "mean_energy", "mean_speechiness", "mean_acousticness","mean_instrumentalness", "mean_liveness", "mean_valence"),
name = 'The Eminem Show'
)
fig <- fig %>%
layout(
polar = list(
radialaxis = list(
visible = T,
range = c(0,1)
)
)
)
fig
```
***
#### This is a radarchart which represents all the mean values of eminems songs.
- It is interesting that instrumentalness is almost non-existent.
- Energy and danceability are high.
- Speechiness is low, this can be explained by eminemns gimmick. Namely rapping very fast, which is hard to replicate.
- Most of his albums share the same charcteristics, mainly differing in energy.
### Chroma of Mockingbird
```{r}
mockingbird<-
get_tidy_audio_analysis("561jH07mF1jHuk7KlaeF0s") %>%
select(segments) %>%
unnest(segments) %>%
select(start, duration, pitches)
```
```{r}
mockingbird %>%
mutate(pitches = map(pitches, compmus_normalise, "euclidean")) %>%
compmus_gather_chroma() %>%
ggplot(
aes(
x = start + duration / 2,
width = duration,
y = pitch_class,
fill = value
)
) +
geom_tile() +
labs(x = "Time (s)", y = NULL, fill = "Magnitude") +
theme_minimal() +
scale_fill_viridis_c() +
ggtitle("Chroma sampling of Mockingbird using euclidean") +
theme(title = element_text(size = 9))
```
***
#### Mocking bird
- Mostly played in C D and E
### Results
***
#### Notable things
- Many skits are not popular, still eminem keeps them in his album. This might be since most albums have a story behind them and the skit shows some light on this backstory. An example is the skits with his manager Paul.
- Most of his big albums have atleast one popular song. indicating that he is still performing well even after all those years.
- WHat i still want to do is comapare different albums, especially one of his first vs one of his last and see if there are big differences between them. Sugestions on visualisation are welcome :)